package io.renren.modules.task.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;
import io.renren.modules.task.dao.MtCcAreaRouteDao;
import io.renren.modules.task.entity.MtCcAreaRouteEntity;
import io.renren.modules.task.model.MtCcAreaRouteEntityVo;
import io.renren.modules.task.service.MtCcAreaRouteService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;


@Service("mtCcAreaRouteService")
public class MtCcAreaRouteServiceImpl extends ServiceImpl<MtCcAreaRouteDao, MtCcAreaRouteEntity> implements MtCcAreaRouteService {

    @Autowired
    private MtCcAreaRouteDao mtCcAreaRouteDao;
    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<MtCcAreaRouteEntity> page = this.page(
                new Query<MtCcAreaRouteEntity>().getPage(params),
                new QueryWrapper<MtCcAreaRouteEntity>()
        );

        return new PageUtils(page);
    }

    @Override
    public MtCcAreaRouteEntityVo selectEmptyCarPoint(String consoleCode) {
        return mtCcAreaRouteDao.selectEmptyCarPoint(consoleCode);
    }

    @Override
    public List<MtCcAreaRouteEntityVo> selectRouteCode(String consoleCode) {
        return mtCcAreaRouteDao.selectRouteCode(consoleCode);
    }

    @Override
    public List<MtCcAreaRouteEntityVo> selectRouteCodeByTaskType(Map<String, Object> params) {
        return mtCcAreaRouteDao.selectRouteCodeByTaskType(params);
    }

    @Override
    public List<MtCcAreaRouteEntityVo> selectMouthCarPointByTaskType(Map<String, Object> params) {
        return mtCcAreaRouteDao.selectMouthCarPointByTaskType(params);
    }

}